<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'vehicle.label', default: 'Vehicle')}"/>
    <title>创建诉讼信息</title>
    <style>
        .lineHeight{
            line-height: 34px;
        }
    </style>
</head>

<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>PLS CINDATA</li>
                    <li>
                        <g:link controller="menu" action="index">CINDATA</g:link>
                    </li>
                    <li class="active">
                        <span>创建诉讼信息</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                创建诉讼信息
            </h2>
        </div>
    </div>
</div>

<g:form action="saveDeferment">
    <g:if test="${flash.message}">
        <div class="message alert alert-info" role="status">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${this.menu}">
        <ul class="errors" role="alert">
            <g:eachError bean="${this.menu}" var="error">
                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message
                        error="${error}"/></li>
            </g:eachError>
        </ul>
    </g:hasErrors>

    <g:hiddenField name="id"  value="${riskWarning?.id}"/>

    <input type="hidden" name="targetUri" id="targetUri" value="${params?.targetUri}"/>
    <div class="content animate-panel">
        <div class="row">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    贷款信息
                </div>

                <div class="panel-body form-horizontal">
                    <div class="form-group">
                        <label class="col-md-2 control-label">借款人</label>
                        <div class="col-md-3 lineHeight">
                            ${this?.riskWarning?.mortgage?.mortgageContact?.fullName}
                        </div>

                        <label class="col-md-2 control-label">借款人联系方式</label>
                        <div class="col-md-3 lineHeight">
                            ${this.riskWarning?.mortgage?.mortgageContact?.cellphone}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">借款人家庭住址</label>
                        <div class="col-md-3 lineHeight">
                            ${this.riskWarning?.mortgage?.mortgageContact?.householdAddress}
                        </div>

                        <label class="col-md-2 control-label">贷款合同号</label>
                        <div class="col-md-3 lineHeight">
                            ${this.riskWarning?.mortgage?.contractNo}
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">计划开始时间</label>
                        <div class="col-md-3 lineHeight">
                            <g:formatDate date="${this.riskWarning?.startTime}" format="yyyy-MM-dd"/>
                        </div>

                        <label class="col-md-2 control-label">计划完成时间</label>
                        <div class="col-md-3 lineHeight">
                            <g:formatDate date="${this.riskWarning?.endTime}" format="yyyy-MM-dd"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">处置措施</label>
                        <div class="col-md-3 lineHeight">
                            ${this.riskWarning?.disposalMethod?.name}
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>

        <div class="content animate-panel">
            <div class="row">
                <div class="hpanel hblue">
                    <div class="panel-heading">
                        %{--代偿信息--}%
                    </div>

                    <div class="panel-body form-horizontal">
                        <div class="form-group">
                            <label class="col-md-2 control-label is-required">应还款总额</label>
                            <div class="col-md-3 lineHeight">
                                ${riskWarning?.mortgage?.loansBalance ? riskWarning?.mortgage?.loansBalance : '-'}
                            </div>
                            <label class="col-md-2 control-label is-required">还款截止时间</label>
                            <div class="col-md-3 lineHeight">
                                <g:datePicker class="form-control" name="repaymentEndDate" value="${riskWarning?.repaymentEndDate}" precision="day"/>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>


    <div class="content animate-panel">
        <div class="row">
                <div class="panel-body form-horizontal">
                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-6">
                            <g:submitButton class="btn btn-info" name="create" value="保存"/>
                        </div>
                    </div>
                </div>
        </div>
    </div>

</g:form>

<g:javascript>
$(function () {
$('.datepicker').datepicker({
language: 'zh-CN',
    format:"yyyy/mm/dd"
});
$('.input-group.date').datepicker({ });
$('.input-daterange').datepicker({ });
});

</g:javascript>
</body>
</html>
